const http = uni.$u.http

//登錄
export const passLogin = (params, config = {}) => http.post('/api/user/login/password', params, config);//密碼登錄
export const mobileLogin = (params, config = {}) => http.post('/api/user/login/mobile', params, config);//驗證碼登錄
export const checkMessage = (params, config = {}) => http.post('/api/home/sendSms', params, config);//短信驗證碼
export const resetpwd = (params, config = {}) => http.post('/api/user/login/reset', params, config);//忘記密碼(修改密碼)

//地區
export const getCountry = (data) => http.get('/api/home/getCountry', data);
export const getAllCountriesWithCities = (data) => http.get('/api/home/getCountriesWithCities', data);
export const googleAddress = (params, config = {}) => http.post('/api/home/search/googleMaps', params, config);//谷歌地址查询

//首頁
export const getBanner = (data) => http.get('/api/config/banner', data);//首页輪播圖
export const getTag = (data) => http.get('/api/home/getCategory', data);//首页Tag
export const indexList = (data) => http.get('/api/cms/datalist', data);//首页列表接口
export const searchUser = (data) => http.get('/addons/cms/api.archives/search_user', data);//搜索-用戶推薦

//用戶
export const getUserInfo = (data) => http.get('/api/user/info', data);//獲取本人用戶信息
export const getUserInformation = (data) => http.	get('/api/user/userinfo', data);//獲取用戶信息(他人)
export const userIndexList = (data) => http.get('/addons/cms/api.archives/user_index_list', data);//用戶列表
export const myFans = (data) => http.get('/api/my/fans', data);//粉絲列表
export const myFocus = (data) => http.get('/api/my/focus', data);//追蹤列表
export const myTags = (data) => http.get('/api/my/tags', data);//追蹤的話題

export const profileUser = (params, config = {}) => http.post('/api/user/edit', params, config);//编辑用户信息
export const skillComment = (data) => http.get('/api/my/rate', data);//获取我的评价
export const authVert = (params, config = {}) => http.post('/api/user/verification', params, config);//实名认证
export const addressAdd = (params, config = {}) => http.post('/api/my/address/save', params, config);//個人地址添加
export const addressEdit = (params, config = {}) => http.post('/api/my/address/edit', params, config);//個人地址編輯
export const addressList = (params, config = {}) => http.post('/api/my/address/datalist', params, config);//個人地址列表
export const addressDel = (params, config = {}) => http.post('/api/my/address/del', params, config);//個人地址刪除
export const myIndexList = (params, config = {}) => http.post('/api/my/cms/datalist', params, config);//獲取用戶文章列表
export const myCmsList = (params, config = {}) => http.post('/api/my/datalist', params, config);//獲取個人文章列表
export const focusTo = (params, config = {}) => http.post('/api/user/my/focususer', params, config);//追蹤用戶
export const focusToTags = (params, config = {}) => http.post('/api/user/my/focustags', params, config);//追蹤用戶


//消息
export const getMsg = (data) => http.get('/api/msg/datalist', data);//獲取消息列表
export const readMsg = (params, config = {}) => http.post('/addons/cms/api.attention/read_msg', params, config);//清除指定类型通知未读数
export const myOrderLog = (data) => http.get('/addons/cms/api.archives/my_order_log', data);//獲取訂單通知
export const likesUser = (data) => http.get('/addons/cms/api.archives/likes_user', data);//獲取點讚通知信息
export const commentMyIndex = (data) => http.get('/addons/cms/api.comment/my_index', data);//
export const companyOrderLog = (data) => http.get('/addons/cms/api.archives/company_order_log', data);//獲取系統通知
export const readAllMsg = (data) => http.get('/api/Talk/readmsg', data);//全部已讀
//聊天
export const getChatRoomList = (data) => http.get('/api/chat/rooms', data);//獲取聊天室列表
export const getChatList = (data) => http.get('/api/chat/messages', data);//獲取聊天内容列表
export const getChatNewList = (data) => http.get('/api/chat/messages/new', data);//獲取聊天内容列表
export const createChat = (params, config = {}) => http.post('/api/chat/rooms/created', params, config);//發起聊天
export const sendMsg = (params, config = {}) => http.post('/api/chat/messages/send', params, config);//發送消息
export const delChat = (params, config = {}) => http.post('/api/chat/rooms/delete', params, config);//刪除聊天
export const readAllChat = (params, config = {}) => http.post('/api/chat/rooms/readall', params, config);//全部已讀


//詳情
export const archivesDetail = (params, config = {}) => http.post('/api/cms/detail', params, config);//獲取任務詳情
export const archivesStart = (params, config = {}) => http.post('/api/cms/stars', params, config);//收藏
export const archivesLikes = (params, config = {}) => http.post('/api/cms/likes', params, config);//点赞
export const commentReplay = (params, config = {}) => http.post('/api/cms/comment', params, config);//評論
export const getComment = (params, config = {}) => http.post('/api/cms/getComment', params, config);//獲取評論
export const getEvaluation = (params, config = {}) => http.post('/api/cms/getEvaluation', params, config);//獲取評價


//订单
export const archivesPost = (params, config = {}) => http.post('/api/cms/save', params, config);//发布服務
export const archivesEdit = (params, config = {}) => http.post('/api/cms/edit', params, config);//保存服務編輯
export const preOrder = (params, config = {}) => http.post('/api/order/store', params, config);//下單
export const createdEcPay = (params, config = {}) => http.post('/api/order/createdEcPay', params, config);//創建支付
export const goPay = (params, config = {}) => http.post('/api/order/pay', params, config);//支付
export const myOrder = (params, config = {}) => http.post('/api/my/consume', params, config);//消费订单记录
export const reserveOrder = (params, config = {}) => http.post('/api/my/work', params, config);//工作订单
export const orderDetail = (params, config = {}) => http.post('/api/order/detail', params, config);//订单詳情
export const confirmOrder = (params, config = {}) => http.post('/api/order/confirm', params, config);//确认订单（接受订单）
export const refuseOrder = (params, config = {}) => http.post('/api/order/refuse', params, config);//拒绝订单
export const cancelOrder = (params, config = {}) => http.post('/api/order/cancel', params, config);//取消订单
export const startOrder = (params, config = {}) => http.post('/api/order/start', params, config);//开始订单
export const finishOrder = (params, config = {}) => http.post('/api/order/finish', params, config);//完成订单
export const rateOrder = (params, config = {}) => http.post('/api/order/rate', params, config);//评价
export const editOrder = (params, config = {}) => http.post('/api/order/edit', params, config);//修改服務完成時間
export const ceshiOrder = (params, config = {}) => http.post('/api/order/pay/ceshi', params, config);//測試用


//搜索
export const userSearch = (params, config = {}) => http.post('/api/home/search/user', params, config);//發佈頁话题
export const tagsSearch = (params, config = {}) => http.post('/api/home/search/tags', params, config);//發佈頁话题
export const userRecom = (params, config = {}) => http.post('/addons/cms/api.archives/search_user', params, config);//搜索用戶
export const tagsRecom = (params, config = {}) => http.post('/addons/cms/api.archives/search_tag', params, config);//搜索頁話題
export const tagsAdd = (params, config = {}) => http.post('/api/tags/save', params, config);//創建話題
export const searchIndex = (params, config = {}) => http.post('/api/home/search', params, config);//創建話題


//公共
export const getConfig = (data) => http.get('/api/config/getconfig', data);//獲取配置信息
export const getAgreement = (data) => http.get('/api/config/agreement', data);//獲取各類協議

// get请求，获取菜单，注意：get请求的配置等，都在第二个参数中，详见前面解释
// export const getMenu = (data) => http.get('/ebapi/public_api/index', data)
